<script type="text/javascript">
	var hidLocation = $('hid-main-wsurl').val()+'sys/login/index';
    if(top.location != hidLocation) {
		if(parent){
			parent.tb_remove();
        }
    }
	function setLang(langId) {
		var websiteUrl = $('#hid-main-wsurl').val();
		$.ajax({
			type : 'post',
			url:websiteUrl+'sys/login/setlang/',
			data: ({
				langId: langId
			}),
			success: function() {
				top.location.reload();
			}
		});
	}
</script>

<?php if(isset($this->ieWarning)): ?>
	<div id="ie_warning">
		<?php echo $this->ieWarning; ?>
	</div>
<?php endif; ?>

<div id="seotoaster" class="screencenter">
<div class="admineditwhat">{%Login%}</div>
	<div style="text-align: center;">
		<?php if(isset($this->langs)): ?>
			<?php foreach($this->langs as $lang): ?>
				<img style="cursor:pointer;" src="<?php echo $this->websiteUrl . 'system/images/flags/'. $lang . '.png'; ?>" id="<?php echo $lang; ?>" class="langbtn" onclick="setLang($(this).attr('id'))" alt="<?php echo $lang; ?>" />&nbsp;&nbsp;
			<?php endforeach; ?>
		<?php endif; ?>
	</div>
	<div id="login-errors" class="errors"  style="<?php echo(isset($this->invalidLogin) && $this->invalidLogin) ? 'display:block' : 'display:none'; ?>; cursor:pointer;" onclick="this.style.display='none';">
		<ul>
			<li id="inv-login-data" style="<?php echo(isset($this->invalidLoginPas) && $this->invalidLoginPas) ? 'display:block' : 'display:none'; ?>"><strong>Invalid login or password.</strong></li>
			<li id="prs-lenght-short" style="<?php echo (isset($this->errorElements)) ? 'display:block;' : 'display:none;';?>"><strong>Please, fill all fields.</strong></li>
		</ul>
	</div>

	<div id="passworderrors" class="errors"  style="left:17%;display:none;cursor:pointer;" onclick="this.style.display='none';">
		<ul>
			<li id="emptyemail" style="display:none;"><strong>Please enter an email address.</strong></li>
			<li id="validemail" style="display:none;"><strong>Please enter the valid email.</strong></li>
			<li id="emailnotexists" style="display:none;"><strong>Email does not exist in the database.</strong></li>
			<li id="notsent" style="display:none;"><strong>Email was not sent. Check the website mailing settings.</strong></li>
		</ul>
	</div>

	<div id="passwordsuccess" class="success"  style="<?php echo (isset($this->recoveringSuccessMessage)) ? 'display:block;' : 'display:none;';?>left:17%;cursor:pointer;" onclick="this.style.display='none';">
		<ul>
			<li id="linksent" style="display:none;"><strong>The confirmation link was sent to your email. Check it out!</strong></li>
			<?php if(isset($this->recoveringSuccessMessage)){?>
				<li id="recoveringSuccessMessage" style="display:block;"><strong>Good, the new password was sent to your email.</strong></li>
			<?php }?>
		</ul>
	</div>

	<form action="<?php echo $this->websiteUrl; ?>sys/login/index/" method="post">
	<div id="loginbox">	
			
		<p style="margin-top:25px;"><label id="login">Login:</label> <?php echo $this->loginForm->login; ?></p>
		<p><label id="password">Password:</label> <?php echo $this->loginForm->password; ?></p>			
	</div>
	<span>
		<a href="javascript:;"  title="Forgot your password?" onclick="showForgotPasswordScreen();">Forgot your password?</a>
	</span>
	<?php echo $this->loginForm->submit; ?>
	</form>
</div>


<div class="reminder">
<h3>Reminder:</h3>
<p>&nbsp;&nbsp; &nbsp;&nbsp;<img style="border: 0px initial initial;" src="<?php echo $this->websiteUrl.'system/images/editadd.png'?>" alt="editaddcontent" />&nbsp;<span>  Add or Edit Content here for this page.</span></p>
<p>&nbsp;&nbsp; &nbsp;&nbsp;<img style="border: 0px initial initial;" src="<?php echo $this->websiteUrl.'system/images/editadd-static-content.png'?>" alt="editadd-static-content" />&nbsp;<span>Add or Edit a "sticky" content that will be displayed on all pages.</span></p>
<p>&nbsp;&nbsp; &nbsp;&nbsp;<img style="border: 0px initial initial;" src="<?php echo $this->websiteUrl.'system/images/editadd-header.png'?>" alt="editadd-header" />&nbsp;<span>Add or Edit a header.</span></p>
<p>&nbsp;&nbsp; &nbsp;&nbsp;<img style="border: 0px initial initial;" src="<?php echo $this->websiteUrl.'system/images/editadd-static-header.png'?>" alt="editadd-static-header" />&nbsp;<span>Add or Edit a "sticky" header that will be displayed on all pages.</span></p>
<p>&nbsp;&nbsp; &nbsp;&nbsp;<img style="border: 0px initial initial;" src="<?php echo $this->websiteUrl.'system/images/editadd-code.png'?>" alt="editadd-code" />&nbsp;<span>Add or edit some php code directly from the front end.</span><br/><span style="margin-left:45px;line-height:15px;">(Do not include your <code><?php echo htmlspecialchars('<?PHP  ?>');?></code> tags)</span></p>
</div>

<div class="forgotpassword">
	<form action="javascript:;">
	<p>
		<label>{%Enter your Email address:%}</label>
	</p>
	<p>
		<input type="text" id="email" name="email" value="" />
	</p>
	<p><button class="formsubmit" name="recoverpassword" id="recoverpassword" onclick="sendRecovering();">{%Submit%}</button></p>
</form>
    <span>
		<a href="javascript:;"  style="float:left; margin-top:90px; color:#7C7C7C; cursor:pointer; font-size:14px; font-weight:bold; text-decoration:none" title="Return to Login menu?" onclick="showLoginScreen();">Return to Login Screen?</a>
	</span>
</div>